<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/jquery-3.3.1.min.js"></script>
</head>

<body>
    <a href="http://www.baidu.com" title="都挺好">都挺好</a>
    <input type="checkbox" name="" id="" checked>
    <div index="1">我是div</div>
    <span>123</span>
    <script>
        $(function() {
            console.log($("a").prop("href"));
            $("a").prop("title", "我们都挺好");
            $("input").change(function() {
                    console.log($(this).prop("checked"));
                })
                //console.log($("div").prop("index"));
                //自定义用attr
            console.log($("div").attr("index"));
            $("span").data("uname", "andy");
            console.log($("span").data("uname"));
        })
    </script>
</body>

</html>